describe("(jsturbo) Number", function() {
    describe("format", function() {
        it("should be able to convert to string without formatting", function() {
            expect((1234567).format()).toEqual('1234567');
            expect((1234567.00).format()).toEqual('1234567');
            expect((1234567.456).format()).toEqual('1234567.456');
        });

        it("should be able to format with decimal places", function() {
            expect((1234567).format({decimalPlaces: 2})).toEqual('1234567.00');
            expect((1234567.12).format({decimalPlaces: 2})).toEqual('1234567.12');
            expect((1234567.1234).format({decimalPlaces: 2})).toEqual('1234567.12');
        });

        it("should be able to format with custom decimal separator", function() {
            expect((1234567).format({decimalSeparator: ','})).toEqual('1234567');
            expect((1234567.12).format({decimalSeparator: ','})).toEqual('1234567,12');
            expect((1234567.1234).format({decimalSeparator: ','})).toEqual('1234567,1234');
        });

        it("should be able to format", function() {
            expect((1234567).format({decimalPlaces: 3, decimalSeparator: ','})).toEqual('1234567,000');
            expect((1234567.12).format({decimalPlaces: 3, decimalSeparator: ','})).toEqual('1234567,120');
            expect((1234567.1234).format({decimalPlaces: 3, decimalSeparator: ','})).toEqual('1234567,123');
        });
    });
});
